package Baza;

public class DataFormats {
	public static boolean isNumberLetter(String string) {
    	for (int i = 0; i < string.length(); i++) {
    		if (!Character.isDigit(string.charAt(i))&&!Character.isLetter(string.charAt(i))) {
    			return false;}
    		}
    	return true;
    }
    
    public static boolean isLetter(String string) {
    	for (int i = 0; i < string.length(); i++) {
    		if (!Character.isLetter(string.charAt(i))) {
    			return false;
    		}
    	}
    	return true;
    }
    
    public static boolean isMonkey(String string) {
    	int a=0;
    	char monkey='@';
    	for (int i = 0; i < string.length(); i++) {
    		if (monkey==string.charAt(i))
    		a++;
    	}
    	if (a>=2||a==0){
    		return false;
    	}else{
    		return true;
    	}
    }
}
